Get Detection Result of Gesture Sensor

  • Function:

    magicbox.get_ges_result(port)
    
  • Description: get detection result of gesture sensor

  • Required parameter:

    • port: controller port. data type: int, range: 1~6
  • Return:
    • ID: gesture ID, data type: int
ID Name Description
Null Initialization failed! The initialization of sensor failed.
255 NONE No gesture is identified.
1 RIGHT Right
2 LEFT Left
4 UP Up
8 DOWN Down
16 FORWARD Forward
32 BACKWARD Backward
64 CLOCKWISE Clockwise
128 ANTICLOCKWISE Anticlockwise
  • Example

    res = magicbox.get_ges_result(port=1)
    

    Detect the gesture sensor connected to Port 1 of controller, and return the detection result.

results matching ""

    No results matching ""